/**
 * @param {number[]} numbers
 * @return {number}
 * @description 栈或者队列的思想
 */

var minArray = function (numbers) {
    let queue = []
    let len = numbers.length
    queue.push(numbers[0])
    // 循环遍历 使得队头最小
    for (let i = 1; i < len; i++) {
        // 如果队头大于numbers[i]
        if (queue[0] > numbers[i]) {
            queue.shift()
            queue.push(numbers[i])
        }
    }
    return queue[0]
};